package grape.attend.service.clock.api;

import grape.attend.service.clock.po.Clock;
import grape.common.service.common.IBaseService;
import grape.common.service.trans.ITransService;

/**
 * <p>
 * 打卡设置表 服务类
 * </p>
 *
 * @author yangwei
 * @since 2020-05-08
 */
public interface IClockService extends IBaseService<Clock>, ITransService<String,String> {

    public static final String trans_name = "clockName";

    @Override
    default boolean support(String type) {
        return isEqualAny(type, trans_name);
    }

    @Override
    default String trans(String type, String key) {
        if (isEqual(type, trans_name)) {
            Clock po = getById(key);
            if (po != null) {
                return po.getName();
            }
        }
        return null;
    }
}
